/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2019
 */

package net.dreamlu.db.po;


import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.format.annotation.DateTimeFormat;


import lombok.Data;
import lombok.extern.slf4j.Slf4j;
/**
 *
 * @author lambert.wang email:lambert.wang(a)crediteyes.com
 * @version 1.0
 * @since 1.0
 */
@Data
@Slf4j
@Entity
@Table(name = "t_pay")
public class Pay implements Serializable {
	private static final long	serialVersionUID	= 5454155825314635342L;
	//alias
	public static final String TABLE_ALIAS = "Pay";
	public static final String ALIAS_ID = "主键";
	public static final String ALIAS_NICK_NAME = "nickName";
	public static final String ALIAS_INFO = "info";
	public static final String ALIAS_MONEY = "money";
	public static final String ALIAS_EMAIL = "email";
	public static final String ALIAS_STATE = "显示状态 0待审核 1确认显示 2驳回 3通过不展示";
	public static final String ALIAS_PAY_TYPE = "payType";
	public static final String ALIAS_CREATE_TIME = "createTime";
	public static final String ALIAS_UPDATE_TIME = "updateTime";
	public static final String ALIAS_TEST_EMAIL = "假管理邮箱";
	public static final String ALIAS_USERNAME = "username";
	
	public static final String PROP_ID = "id";
	public static final String PROP_NICK_NAME = "nickName";
	public static final String PROP_INFO = "info";
	public static final String PROP_MONEY = "money";
	public static final String PROP_EMAIL = "email";
	public static final String PROP_STATE = "state";
	public static final String PROP_PAY_TYPE = "payType";
	public static final String PROP_CREATE_TIME = "createTime";
	public static final String PROP_UPDATE_TIME = "updateTime";
	public static final String PROP_TEST_EMAIL = "testEmail";
	public static final String PROP_USERNAME = "username";
	//columns START
    /**
     * 主键       db_column: id 
     */ 	
	@Id 
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false, insertable = true, updatable = true, length = 10)
	private java.lang.Integer id;
    /**
     * nickName       db_column: nick_name 
     */ 	
	@Column(name = "nick_name", unique = false, nullable = true, insertable = true, updatable = true, length = 255)
	private java.lang.String nickName;
    /**
     * info       db_column: info 
     */ 	
	@Column(name = "info", unique = false, nullable = true, insertable = true, updatable = true, length = 255)
	private java.lang.String info;
    /**
     * money       db_column: money 
     */ 	
	@Column(name = "money", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	private Long money;
    /**
     * email       db_column: email 
     */ 	
	@Column(name = "email", unique = false, nullable = true, insertable = true, updatable = true, length = 255)
	private java.lang.String email;
    /**
     * 显示状态 0待审核 1确认显示 2驳回 3通过不展示       db_column: state 
     */ 	
	@Column(name = "state", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	private java.lang.Integer state;
    /**
     * payType       db_column: pay_type 
     */ 	
	@Column(name = "pay_type", unique = false, nullable = true, insertable = true, updatable = true, length = 255)
	private java.lang.String payType;
    /**
     * createTime       db_column: create_time 
     */ 	
	@CreatedDate				
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
	@Column(name = "create_time", unique = false, nullable = true, insertable = true, updatable = true, length = 19)
	private java.time.LocalDateTime createTime;
    /**
     * updateTime       db_column: update_time 
     */ 	
	@LastModifiedDate				
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
	@Column(name = "update_time", unique = false, nullable = true, insertable = true, updatable = true, length = 19)
	private java.time.LocalDateTime updateTime;
    /**
     * 假管理邮箱       db_column: test_email 
     */ 	
	@Column(name = "test_email", unique = false, nullable = true, insertable = true, updatable = true, length = 255)
	private java.lang.String testEmail;
    /**
     * username       db_column: username 
     */ 	
	@Column(name = "username", unique = false, nullable = true, insertable = true, updatable = true, length = 255)
	private java.lang.String username;
	//columns END
	@Override
	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.JSON_STYLE)
			.append(PROP_ID,getId())
			.append(PROP_NICK_NAME,getNickName())
			.append(PROP_INFO,getInfo())
			.append(PROP_MONEY,getMoney())
			.append(PROP_EMAIL,getEmail())
			.append(PROP_STATE,getState())
			.append(PROP_PAY_TYPE,getPayType())
			.append(PROP_CREATE_TIME,getCreateTime())
			.append(PROP_UPDATE_TIME,getUpdateTime())
			.append(PROP_TEST_EMAIL,getTestEmail())
			.append(PROP_USERNAME,getUsername())
			.toString();
	}
	@Override
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Pay == false) return false;
		if(this == obj) return true;
		Pay other = (Pay)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
	
}
